#import "Application.h"

@implementation NSApplication (Password_Monitor)

- (id)initMainMenu:(NSMenu *)menu withTitle:(NSString *)title {
    //This links the NSMenu from the MainMenu NIB to the status menu when it is called from the Awake From NIB handler in the AppleScript.
    NSStatusItem *statusItem = [[[NSStatusBar systemStatusBar] statusItemWithLength:50] retain];
    [statusItem setHighlightMode:YES];
    [statusItem setTitle:title];
    [statusItem setMenu:menu];
    [statusItem setEnabled:YES];
    return statusItem;
}

- (void)updateTitle:(NSStatusItem *)statusItem withTitle:(NSString *)title {
    [statusItem setTitle:title];
}
@end